﻿using Me.Framework.Xml.DeConvert;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Me.Framework.InfoExchange
{
    public static class InfoExchangeXml
    {
        //===================================
        #region "===================================Xml To Obj==================================="
        public static T DeConvert<T>(string uri)
        {
            string xml = null;
            T result = new XmlToObj().ToObj<T>(uri,xml);
            return result;
        }

        public static T ToObj<T>(string xml)
        {
            string uri = null;
            T result = new XmlToObj().ToObj<T>(uri, xml);
            return result;
        }

        public static string ToXml<T>(T obj)
        {
            string xml = null;
            xml = new ObjToXml().ToXml<T>(obj);
            return xml;
        }

        #endregion  "===================================Xml To Obj==================================="
    }
}
